<template>
	<view class="bookResources">
		<view class="bookResources_box" v-for="(item, index) in bookResources" :key="index">
			<view class="bookResources_top">
				<view class="bookResources_top_left">{{item.headerTitle}}</view>
				<Tags :tagname="bookResourcesTagname"></Tags>
			</view>
			<BookResourcesChild @handleChild="handleChild" :child="item.books"></BookResourcesChild>
		</view>
	</view>
</template>

<script>
	import Tags from "@/components/tag/tag.vue"
	import BookResourcesChild from "@/components/bookResourcesChild/bookResourcesChild.vue"
	export default {
		name:"bookResources",
		props: {
			bookResources: {
				type: Array,
				default: []
			}
		},
		components: {
			Tags,
			BookResourcesChild
		},
		data() {
			return {
				bookResourcesTagname: "查看全部",
			};
		},
		methods: {
			handleChild(event){
				this.$emit("handleChild", event)
			}
		}
	}
</script>

<style scoped>
.bookResources{
	width: 100%;
	padding: 0 20rpx;
	box-sizing: border-box;
	margin-top: 60rpx;
	margin-bottom: 100rpx;
}
.bookResources_top{
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 30rpx;
}
.bookResources_top_left{
	font-size: 40rpx;
}
.bookResources_top_right{
	color: #808080;
}
</style>
